<template>
  <div>
    <div
      class="address_map"
     
      @click="
        $router.push({
          name: 'Address',
          params: { city: city, address: address, district: district },
        })
      "
    >
      <i class="el-icon-location-information"></i>
      <span>{{ address }}</span>
      <i class="el-icon-arrow-down"></i>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  computed: {
    address() {
      return this.$store.getters.address;
    },
    city() {
      return (
        this.$store.getters.location.addressComponent.city ||
        this.$store.getters.location.addressComponent.city.province
      );
    },
    district() {
      return this.$store.getters.location.addressComponent.district;
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>
<style scoped lang="scss">
.address_map {
  display: flex;
  align-items: center;
  width: 100%;
  height: 10vh;
  // background: red;
  margin-right: 10px;
  span {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-size: 14px;
  }
}
</style>
